﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.IO;

namespace olierFrm.Extensions.Object
{
    public class SaveAsFile
    {
        public void Upload(FileStream stream, string fileName)
        {
            var Request = System.Web.HttpContext.Current.Request;
            string path = AppDomain.CurrentDomain.BaseDirectory + "uploads/";
            path += Guid.NewGuid().ToString().Replace("-", "") + "/";
            foreach (HttpPostedFileBase f in Request.Files)
            {
                MemoryStream ms = new MemoryStream();
                
                f.SaveAs(path + f.FileName);
            }
        }
    }
}
